import { DialogTable } from 'custom/index'
import { getSubByShopId } from '../api'

const subDialog = new DialogTable('DialogTable')

subDialog
  .title('查看子账号')
  .width('60%')
  .api(getSubByShopId)
  .useTable()
    .addIndexColumn()
    .useColumn('accountName').label('子账号名称').minWidth(160).end()
    .useColumn('accountPassword').label('子账号密码').end()
    .useColumn('createUserName').label('创建人').minWidth(180).end()
    .useColumn('createTime').label('创建时间').minWidth(140).end()
    .useColumn('serviceShiftName').label('状态').formatter(row => row.status === 1 ? '正在合作' : '已停用').minWidth(160).end()
    .upto('DialogTable')
  .usePagination()

export { subDialog }
